﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZoambieGaem {
    class Maps {

        public static int width = 32;
        public static int height = 20;

        //public static int width = 15;
        //public static int height = 12;

        //KUN MUOKKAAT MAPPIA NIIN PÄIVITÄ MYÖS width JA height !!!!!!!!
        /*
        public static int[][] map = {
            new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
            new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
            new int[] {0,0,0,1,0,1,0,0,1,0,0,0,0,0,0},
            new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
            new int[] {0,0,0,0,1,0,0,0,0,0,0,0,0,0,0},
            new int[] {0,0,0,0,1,0,0,0,0,0,0,0,0,0,0},
            new int[] {0,1,0,0,0,0,0,1,1,0,0,0,0,0,0},
            new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
            new int[] {0,0,0,1,0,0,0,0,0,0,0,1,0,0,0},
            new int[] {0,0,0,1,0,0,0,0,0,0,1,0,0,0,0},
            new int[] {0,0,0,0,1,0,0,0,0,1,0,0,0,0,0},
            new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
        };
         */ 
        
        public static int[][] map = {
                                         new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,0,0,0},
                                         new int[] {0,0,2,1,2,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,2,1,2,0,0,0},
                                         new int[] {0,0,2,1,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,1,2,0,0,0},
                                         new int[] {0,0,2,1,2,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,2,1,2,0,0,0},
                                         new int[] {0,0,2,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,2,0,0,0},
                                         new int[] {0,0,2,1,2,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,2,0,0,0},
                                         new int[] {0,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0,0,0},
                                         new int[] {0,0,0,0,2,2,2,2,2,2,0,0,0,0,0,2,2,2,0,2,2,2,0,0,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,2,1,1,1,1,2,0,0,1,0,0,2,1,2,0,2,1,2,0,0,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,2,1,1,1,1,2,0,0,1,0,0,2,1,2,0,2,1,2,0,0,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,2,1,1,1,1,2,0,0,1,0,0,2,1,2,2,2,1,2,0,0,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,2,1,1,1,1,2,0,0,0,0,0,2,2,1,1,1,2,2,0,0,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,2,1,1,1,1,2,0,0,0,0,0,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,2,1,1,1,1,2,2,2,2,2,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
                                         new int[] {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
                                      };

        public static LinkedList<Point[]> createHull(Master m) {

            LinkedList<Point[]> points = new LinkedList<Point[]>();

            Point[] p1 = {  
                            new Point( 3 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 3 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 3 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 3 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 3 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 3 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 3 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 3 * m.blockSize , 7 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 7 * m.blockSize ), 
                            new Point( 3 * m.blockSize , 7 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 7 * m.blockSize ), 
                            new Point( 3 * m.blockSize , 8 * m.blockSize ), 
                            new Point( 4 * m.blockSize , 8 * m.blockSize ), 
                         };

            Point[] p2 = {  
                            new Point( 16 * m.blockSize , 10 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 10 * m.blockSize ), 
                            new Point( 16 * m.blockSize , 11 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 11 * m.blockSize ), 
                            new Point( 16 * m.blockSize , 11 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 11 * m.blockSize ), 
                            new Point( 16 * m.blockSize , 12 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 12 * m.blockSize ), 
                            new Point( 16 * m.blockSize , 12 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 12 * m.blockSize ), 
                            new Point( 16 * m.blockSize , 13 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 13 * m.blockSize ), 
                         };


            Point[] p4 = { 
                            new Point( 20 * m.blockSize , 10 * m.blockSize ), 
                            new Point( 21 * m.blockSize , 10 * m.blockSize ), 
                            new Point( 20 * m.blockSize , 11 * m.blockSize ), 
                            new Point( 21 * m.blockSize , 11 * m.blockSize ), 
                            new Point( 20 * m.blockSize , 11 * m.blockSize ), 
                            new Point( 21 * m.blockSize , 11 * m.blockSize ), 
                            new Point( 20 * m.blockSize , 12 * m.blockSize ), 
                            new Point( 21 * m.blockSize , 12 * m.blockSize ), 
                            new Point( 20 * m.blockSize , 12 * m.blockSize ), 
                            new Point( 21 * m.blockSize , 12 * m.blockSize ), 
                            new Point( 20 * m.blockSize , 13 * m.blockSize ), 
                            new Point( 21 * m.blockSize , 13 * m.blockSize ), 
            };

            Point[] p3 = {
                            new Point( 19 * m.blockSize , 13 * m.blockSize ), 
                            new Point( 20 * m.blockSize , 13 * m.blockSize ), 
                            new Point( 19 * m.blockSize , 14 * m.blockSize ), 
                            new Point( 20 * m.blockSize , 14 * m.blockSize ),
                            new Point( 18 * m.blockSize , 13 * m.blockSize ), 
                            new Point( 19 * m.blockSize , 13 * m.blockSize ), 
                            new Point( 18 * m.blockSize , 14 * m.blockSize ), 
                            new Point( 19 * m.blockSize , 14 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 13 * m.blockSize ), 
                            new Point( 18 * m.blockSize , 13 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 14 * m.blockSize ), 
                            new Point( 18 * m.blockSize , 14 * m.blockSize ), 
            };

            Point[] p5 = {
                            new Point( 27 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 27 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 4 * m.blockSize ),
                            new Point( 27 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 27 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 27 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 27 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 27 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 27 * m.blockSize , 7 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 7 * m.blockSize ), 
                            new Point( 27 * m.blockSize , 7 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 7 * m.blockSize ), 
                            new Point( 27 * m.blockSize , 8 * m.blockSize ), 
                            new Point( 28 * m.blockSize , 8 * m.blockSize ), 
            };


            Point[] p6 = {  
                            new Point( 8 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 8 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 9 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 9 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 10 * m.blockSize , 5 * m.blockSize ),
                            new Point( 10 * m.blockSize , 6 * m.blockSize ),
                            new Point( 11 * m.blockSize , 5 * m.blockSize ),
                            new Point( 11 * m.blockSize , 6 * m.blockSize ),
                            new Point( 12 * m.blockSize , 5 * m.blockSize ),
                            new Point( 12 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 13 * m.blockSize , 5 * m.blockSize ),
                            new Point( 13 * m.blockSize , 6 * m.blockSize ),
                            new Point( 14 * m.blockSize , 5 * m.blockSize ),
                            new Point( 14 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 15 * m.blockSize , 5 * m.blockSize ), 
                            new Point( 15 * m.blockSize , 6 * m.blockSize ), 
                            new Point( 16 * m.blockSize , 5 * m.blockSize ),
                            new Point( 16 * m.blockSize , 6 * m.blockSize ),
                            new Point( 17 * m.blockSize , 5 * m.blockSize ),
                            new Point( 17 * m.blockSize , 6 * m.blockSize ),
                            new Point( 18 * m.blockSize , 5 * m.blockSize ),
                            new Point( 18 * m.blockSize , 6 * m.blockSize ), 
                         };


            Point[] p7 = {  
                            new Point( 7 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 7 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 8 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 8 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 9 * m.blockSize , 3 * m.blockSize ),
                            new Point( 9 * m.blockSize , 4 * m.blockSize ),
                            new Point( 10 * m.blockSize , 3 * m.blockSize ),
                            new Point( 10 * m.blockSize , 4 * m.blockSize ),
                            new Point( 11 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 11 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 12 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 12 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 13 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 13 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 14 * m.blockSize , 3 * m.blockSize ),
                            new Point( 14 * m.blockSize , 4 * m.blockSize ),
                            new Point( 15 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 15 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 16 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 16 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 17 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 18 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 18 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 19 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 19 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 20 * m.blockSize , 3 * m.blockSize ),
                            new Point( 20 * m.blockSize , 4 * m.blockSize ),
                            new Point( 21 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 21 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 22 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 22 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 23 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 23 * m.blockSize , 4 * m.blockSize ), 
                            new Point( 24 * m.blockSize , 3 * m.blockSize ), 
                            new Point( 24 * m.blockSize , 4 * m.blockSize ), 
                         };


            points.AddFirst(GConvexhull.convexhull(p1));
            points.AddFirst(GConvexhull.convexhull(p2));
            points.AddFirst(GConvexhull.convexhull(p3));
            points.AddFirst(GConvexhull.convexhull(p4));
            points.AddFirst(GConvexhull.convexhull(p5));
            points.AddFirst(GConvexhull.convexhull(p6));
            points.AddFirst(GConvexhull.convexhull(p7));

            return points;
        }


    }


    


}
